// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from '@/plugins/request';
/**
 *订单-订单列表
 */
export function orderList(data) {
	return request({
		url: `order/list`,
		method: 'get',
		params: data
	});
};

export function shopifyOrderList(data) {
    return request({
        url: `order/shopify_list`,
        method: 'get',
        params: data
    });
};

export function saveOrderApi(data) {
    return request({
        url: 'order/createStoreOrder',
        method: 'POST',
        data
    });
}

export function orderHeaderInfo(data) {
    return request({
        url: 'order/type_header',
        method: 'get',
        params: data
    });
}

export function orderAllHeaderInfo(data) {
    return request({
        url: 'order/all_header',
        method: 'get',
        params: data
    });
}


export function orderShopifyHeaderInfo(data) {
    return request({
        url: 'order/shopify_header',
        method: 'get',
        params: data
    });
}

/**
 * @description 订单详情
 */
export function orderInfoApi(id) {
    return request({
        url: `order/findStoreOrder/${id}`,
        method: 'get'
    });
}

//生成pdf
export function orderInvoiceApi(id) {
    return request({
        url: `order/findStoreOrderInvoice/${id}`,
        method: 'get'
    });
}

export function getSupplierInfo() {
    return request({
        url: `supplier/getSupplierInfo`,
        method: 'get',
    });
}


